/*
 * gameobjectviewfactory.h
 *
 *  Created on: Nov 29, 2009
 *      Author: magnus
 */

#ifndef GAMEOBJECTVIEWFACTORY_H_
#define GAMEOBJECTVIEWFACTORY_H_

#include <string>
#include <map>

namespace spacedefender {

class GameObjectReader;
class GameObjectView;

typedef const GameObjectView* gov;
class GameObjectViewFactory {
public:

	static GameObjectViewFactory* GetInstance() { return &_instance; } ;

	virtual ~GameObjectViewFactory();
	bool Init(const GameObjectReader* gor);
	GameObjectView* CreateView(const std::string& id) const;
private:
	GameObjectViewFactory();
	GameObjectViewFactory(const GameObjectViewFactory &) {} ;
	GameObjectViewFactory& operator=(const GameObjectViewFactory &rhs) { return *this; } ;

	static GameObjectViewFactory _instance;

	std::map<std::string, gov > _objects;



};

}

#endif /* GAMEOBJECTVIEWFACTORY_H_ */
